import { defineStore } from 'pinia'
import { ref, computed } from 'vue'

export const useCounterStore = defineStore(
  'big-counter',
  () => {
    const counter = ref<number>(4)
    const doubleCounter = computed(() => counter.value * 2)

    return { counter, doubleCounter }
  },
  {
    persist: true
  }
)
